x=input("")
hz='零壹贰叁肆伍陆柒捌玖'
dw='拾佰仟万'
sz='0123456789'
f=dict(zip(sz,hz))
result=list()
for ch in x:
    result.append(f[ch])
i=2
n = 0

rlen= len(result)
while(i<=rlen):

    if(i%6==2or(i>5 and i%6==0)):
        result.insert(-i+1-n,dw[0])
        i+=1
        n+=1
    elif(i%6==3):
        result.insert(-i+1-n, dw[1])
        i += 1
        n+=1
    elif (i%6 == 4):
        result.insert(-i+1-n, dw[2])
        i += 1
        n+=1
    elif (i%6 == 5):
        result.insert(-i+1-n, dw[3])
        i += 1
        n+=1
print(result)